-
Notifications
You must be signed in to change notification settings - Fork 17
1280 trip addition overhaul #1281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1281 +/- ##
==========================================
- Coverage 97.27% 97.20% -0.08%
==========================================
Files 171 171
Lines 15117 15085 -32
==========================================
- Hits 14705 14663 -42
- Misses 412 422 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the improvements. Some small questions remain.
@@ -125,8 +125,12 @@ class ABMMobilityEdge | |||
for (int i = int(persons_to_change.size()) - 1; i >= 0; --i) { | |||
auto& person = model_from.get_persons()[persons_to_change[i]]; | |||
auto target_type = person.get_location_type(); | |||
if (target_type == abm::LocationType::Count) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should this happen? Locations with LocationType::Count
should be prohibited.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in the graph abm. Please ask julia but in graph_abmmodel.h
person.set_location(abm::LocationType::Count, trip.destination, std::numeric_limits::max());
is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was discussed extensively. While in the current implementation nothing changes, it is worth noticing that the read-in of trips is now changed: Before, trips that change the model only considered the given LocationType and mapped this to an assigned location of the person. Now, the actual ID is required, which is then taken to determine the LocationType and then again being used to map to an assigned location.
This means that the location type of the ID is used, and people might go to another location (not the ID, but the assigned location of the same type).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a discussion we decided to use a LocationType::invalid, that is inserted after LocationType::Count.
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
If need be, add additional information and what the reviewer should look out for in particular:
Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)